package com.freshcity.upload
{
	import flash.utils.*;
	import flash.external.ExternalInterface;
	
	public class Param
	{
		public function Param()
		{
		}
		public static function getTicket():void
		{
			flash.utils.clearTimeout(Param.ticketTime);
			Param.clearTicket();
			if (Param.ticket) 
			{
				if (Param.ticket.length < 2) 
				{
					if (flash.external.ExternalInterface.available) 
					{
						flash.external.ExternalInterface.call("App.requestTicket", 4);
					}
				}
			}
			else if (flash.external.ExternalInterface.available) 
			{
				flash.external.ExternalInterface.call("App.requestTicket", 4);
			}
			return;
		}
		
		public static function setTicket(arg1:Array):void
		{
			var _j:Array;
			var i:int;
			
			var loc1:*;
			_j = arg1;
			if (_j.length == 0) 
			{
				Param.getTicket();
				return;
			}
			i = 0;
			while (i < _j.length) 
			{
				Param.ticket.push(_j[i]);
				++i;
			}
			Param.ticketTime = flash.utils.setTimeout(function ():void
			{
				Param.getTicket();
				return;
			}, 540000)
			return;
		}
		
		public static function clearTicket():void
		{
			var loc1:*=new Array();
			var loc2:*=0;
			while (loc2 < Param.ticket.length) 
			{
				if (new Date().getTime() - Param.ticket[loc2][1] < 540000) 
				{
					loc1.push(Param.ticket[loc2]);
				}
				++loc2;
			}
			Param.ticket = loc1;
			return;
		}
		
		public static function initLanguage():void
		{
			var loc1:*=null;
			Param.language = {};
			if (flash.external.ExternalInterface.available) 
			{
				loc1 = flash.external.ExternalInterface.call("App.requestLanguage");
				if (loc1 != null) 
				{
					Param.language["CX0189"] = loc1["CX0189"];
					Param.language["CX0193"] = loc1["CX0193"];
					loc1 = null;
				}
			}
			return;
		}
		
		public static function getLanguage(arg1:String):String
		{
			if (Param.language == null) 
			{
				return "";
			}
			return Param.language[arg1];
		}
		
		
		public static var uid:String;
		
		public static var ver:String;
		
		public static var uidUrl:String;
		
		public static var tmpUrl:String;
		
		public static var tmpImgUrl:String;
		
		public static var cookie:String;
		
		public static var imgUrl:String;
		
		public static var delUrl:String;
		
		public static var sourcePicURL:String;
		
		public static var albumURL:String;
		
		public static var modifyNickname:String;
		
		public static var jsFunc:String;
		
		public static var ticket:Array = new Array();;
		
		public static var ticketTime:Number;
		
		public static var language:Object;
		
		public static var limited:String;
		
		public static var s:Object;
		
		public static var verifyCode:String;		
	}
}